import { ResponseDataRoot } from '@/global/root_type'

export interface IGetCodeByPhone extends ResponseDataRoot {
  data: string
}
// 登录数据类型
// 登录请求需要的参数类型
export interface ILoginData {
  phone: string
  code: string
  ip?: string
  openid?: string
}
// 登录请求: 返回的数据

export interface ILoginUserData {
  name: string
  token: string
}
export interface ILoginResponseData extends ResponseDataRoot {
  data: ILoginUserData
}

// 某个用户下的 所有就诊人
export interface IAllPatientContent {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param?: {
    certificatesTypeString: string
    contactsCertificatesTypeString: string
    cityString: string
    fullAddress: string
    districtString: string
    provinceString: string
  }
  userId: number
  name: string
  certificatesType: string
  certificatesNo: string
  sex: number
  birthdate: string
  phone: string
  isMarry: number
  provinceCode: string
  cityCode: string
  districtCode: string
  address: string
  contactsName: string
  contactsCertificatesType: string
  contactsCertificatesNo: string
  contactsPhone: string
  isInsure: number
  cardNo?: any
  status: string
}
export type IAllPatientDataArr = IAllPatientContent[]
export interface IAllUserPatient extends ResponseDataRoot {
  data: IAllPatientDataArr
}

// 用户信息
export interface IUserInfoData {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param?: {}
  openid?: any
  nickName?: any
  phone: string
  name: string
  certificatesType: string
  certificatesNo: string
  certificatesUrl?: any
  authStatus: number
  status: number
}
export interface IUserInfo extends ResponseDataRoot {
  data: IUserInfoData
}

// 证件类型
export interface ICertificatesTypeContent {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param: {}
  parentId: number
  name: string
  value: string
  dictCode: string
  hasChildren: boolean
}
export type ICertificatesTypeArr = ICertificatesTypeContent[]
export interface ICertificatesType extends ResponseDataRoot {
  data: ICertificatesTypeArr
}
// 用户实名认证
export interface IUserParams {
  certificatesNo: string
  certificatesType: string
  certificatesUrl: string
  name: string
}
